#ifndef _VIBE_HXX_
#define _VIBE_HXX_

class VIBE 
{
public:
	VIBE();
	~VIBE();

	void initialize();

	void update();

	inline void setCurrentFrame( unsigned char* i ) { _image = i; }
	inline void setSegmentMap( unsigned char* i ) { _segMap = i; }

	inline void setFrameWidth( int w ) { _frameWidth = w; }
	inline void setFrameHeight( int h ) { _frameHeight = h; }
	inline void setFrameWidthStrip( int s ) { _frameWidthStrip = s; }

    inline bool isInitilized() { return _samples; }

private:
	int getRandomSample();
	int getRandomSubSample();
	int getRandomNeightXCoordinate( int x );
	int getRandomNeightYCoordinate( int y );

private:
	int _frameWidth;
	int _frameHeight;
	int _frameWidthStrip;

	int _sphereRadius;
	int _pixelSamples;
	int _backgroundThreshold;
	int _subSampling;

	int _borderWidth;

	unsigned char* _image;
	unsigned char* _segMap;
	unsigned char** _samples;
};
#endif
